#ifndef WAREHOUSE_H
#define WAREHOUSE_H
#include <set>
#include <ctime>
#include <utility>
#include <string>
#include <map>

#include "product.h"

using namespace std;
namespace a4
{

  class warehouse
  {
  public:
    
    std::string name;
    warehouse(string n,  map<string,pair<string,int>> *UPC_lookup);
    void begin_new_day();
    void receive_item(string upc, int quantity);
		void satisfy_request(string upc, int quantity);
    void set_start_day(tm day);
		void addProduct(string UPC, int expiration);
		bool isStocked(string UPC);
		void endOfList();
		std::pair<std::tm, int> getBusiestDay();
    
    std::pair<tm, int> get_busiest_day();
    
  private:
    std::tm start_date;
    std::tm current_date;
    map<string,pair<string,int>> *UPC_lookup_map;
    map<string,product*> *inventory;
    std::pair<std::tm, int> calc_busiest_day();
    std::pair<std::tm, int> busiest_day;
    void remove_expired();
  };
}
#endif
